MkDevEnvSetup
Text node containing Instructions to set up a dev environment.¶
Example: From project¶
All development for this library happens in the mknodes repo on GitHub. First, you'll need to download the source code and install an editable version of the Python package:
Build system¶
Hatch is used as the build system.
All development for this library happens in the
[mknodes](https://github.com/phil65/mknodes.git) repo on GitHub.
First, you'll need to download the source code and install an
editable version of the Python package:
```` {.md }
# Clone the repository
git clone https://github.com/phil65/mknodes.git
cd mknodes
````
## Build system
Hatch is used as the build system.
```` {.bash }
pip install hatch
````
[More information](https://hatch.pypa.io)
<p>All development for this library happens in the
<a href=".git.md">.git.md</a> repo on GitHub.
First, you'll need to download the source code and install an
editable version of the Python package:</p>
<div class="language-md highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="gh"># Clone the repository</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>git clone .git
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>cd
</span></code></pre></div>
<h2 id="build-system">Build system</h2>
<p>Hatch is used as the build system.</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>pip<span class="w"> </span>install<span class="w"> </span>hatch
</span></code></pre></div>
<p><a href="https://hatch.pypa.io">More information</a></p>
MkDevEnvSetup
├── MkLink('https://github.com/phil65/mknodes.git', 'mknodes')
├── MkCode('# Clone the repository\ngit clone https://github.com/phil65/mknodes.git\ncd mknodes', language='md')
│ ╰── MkText('# Clone the repository\ngit clone https://github.com/phil65/mknodes.git\ncd mknodes')
├── MkHeader('Build system')
├── MkCode('pip install hatch', language='bash')
│ ╰── MkText('pip install hatch')
╰── MkLink('https://hatch.pypa.io', 'More information')
Example: Explicit¶
All development for this library happens in the name repo on GitHub. First, you'll need to download the source code and install an editable version of the Python package:
Build system¶
Hatch is used as the build system.
All development for this library happens in the
[name](http://url_to_git_repo.com/name.git) repo on GitHub.
First, you'll need to download the source code and install an
editable version of the Python package:
```` {.md }
# Clone the repository
git clone http://url_to_git_repo.com/name.git
cd name
````
## Build system
Hatch is used as the build system.
```` {.bash }
pip install hatch
````
[More information](https://hatch.pypa.io)
<p>All development for this library happens in the
<a href="http://url_to_git_repo.com/name.git">name</a> repo on GitHub.
First, you'll need to download the source code and install an
editable version of the Python package:</p>
<div class="language-md highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="gh"># Clone the repository</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>git clone http://url_to_git_repo.com/name.git
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>cd name
</span></code></pre></div>
<h2 id="build-system">Build system</h2>
<p>Hatch is used as the build system.</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>pip<span class="w"> </span>install<span class="w"> </span>hatch
</span></code></pre></div>
<p><a href="https://hatch.pypa.io">More information</a></p>
MkDevEnvSetup
├── MkLink('http://url_to_git_repo.com/name.git', 'name')
├── MkCode('# Clone the repository\ngit clone http://url_to_git_repo.com/name.git\ncd name', language='md')
│ ╰── MkText('# Clone the repository\ngit clone http://url_to_git_repo.com/name.git\ncd name')
├── MkHeader('Build system')
├── MkCode('pip install hatch', language='bash')
│ ╰── MkText('pip install hatch')
╰── MkLink('https://hatch.pypa.io', 'More information')
Bases: MkTemplate
__init__
¶
__init__(
*,
repo_url: str | None = None,
build_backend: BuildSystemStr | None = None,
**kwargs: Any
)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
repo_url
|
str | None
|
Repo url to show. If None, it will be pulled from project. |
None
|
build_backend
|
BuildSystemStr | None
|
Build backend to show install instructions for. If None, it will be pulled from project. |
None
|
kwargs
|
Any
|
Keyword arguments passed to parent |
{}
|
Name | Children | Inherits |
---|---|---|
MkTemplate mknodes.templatenodes.mktemplate Node representing a jinja template. |
graph TD
94596169004896["mkdevenvsetup.MkDevEnvSetup"]
94596168228624["mktemplate.MkTemplate"]
94596169139824["mkcontainer.MkContainer"]
94596169136704["mknode.MkNode"]
94596171773984["node.Node"]
139930746687680["builtins.object"]
94596168228624 --> 94596169004896
94596169139824 --> 94596168228624
94596169136704 --> 94596169139824
94596171773984 --> 94596169136704
139930746687680 --> 94596171773984
/home/runner/work/mknodes/mknodes/mknodes/templatenodes/mkdevenvsetup/metadata.toml
[metadata]
icon = "mdi:dev-to"
status = "new"
name = "MkDevEnvSetup"
virtual_children = true
[examples.regular]
title = "From project"
jinja = """
{{ mk.MkDevEnvSetup() }}
"""
[examples.explicit]
title = "Explicit"
jinja = """
{{ mk.MkDevEnvSetup(repo_url="http://url_to_git_repo.com/name.git") }}
"""
[output.markdown]
template = """
{% set folder_name = node.repo_url.removesuffix(".git").split("/")[-1] %}
All development for this library happens in the
{{ node.repo_url | MkLink(folder_name) }} repo on GitHub.
First, you'll need to download the source code and install an
editable version of the Python package:
{{ ("# Clone the repository
git clone " ~ node.repo_url ~
"
cd " ~ folder_name ) | MkCode(language="md") }}
{{ "Build system" | MkHeader }}
{{ node.build_backend.identifier.capitalize() }} is used as the build system.
{{ ("pip install " ~ node.build_backend.identifier) | MkCode(language="bash") }}
{{ node.build_backend.url | MkLink("More information")}}
"""